import 'package:flutter/material.dart';
import 'package:flutter_downloader/flutter_downloader.dart';
import 'package:zpp_sdzx/pages/cleanobjects/cleanlogin.dart';
import 'package:zpp_sdzx/pages/cleanobjects/cleanlogin2.dart';
import 'package:zpp_sdzx/pages/cleanobjects/cleanobjects_list.dart';
import '../pages/danger/danger_list.dart';
import '../pages/docreview/docreview_list.dart';
import '../pages/docsend/docsend_list.dart';
import '../pages/inspectreport/inspectReport_list.dart';
import '../pages/jxgzp/jxgzp_home.dart';
import '../pages/sdzx/sdzx_home.dart';
import '../pages/security/security_list.dart';
import '../pages/skddl2/skddl_home.dart';
import '../pages/skddl2/skddl_list.dart';
import '../pages/cleanobjects/cleanobjects_list2.dart';
import 'helper/Helper.dart';
import 'pages/homex/login.dart';
import 'helper/global_config.dart';
import 'helper/uidata.dart';
import 'helper/upload_helper.dart';
import 'pages/sdzx/sdzx_work.dart';
import 'pages/smspage/sms_page.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await FlutterDownloader.initialize();
  Helper.Init();
  // Helper.Init();
  runApp(new MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    UploadHelper.uploadCompleted();
    return MaterialApp(
        title: '紫坪铺水库',
        theme: GlobalConfig.themeData,
        home: //FileSpacePage(UIData.NewsPaperSpaceId, true),
            //UpFileBookPage(),
            //XX(),
            //StationBookPage(),
            //  CleanObjectsListPage(true),
            LoginPage(),
        //RecordListPage(UIData.NewsPaperSpaceId,true),
        // DownLoadBookPage(),
        routes: <String, WidgetBuilder>{
          UIData.homeRoute: (BuildContext context) => (SmsSendPage(true)),
          // UIData.loginRoute: (BuildContext context) => (LoginPage()),
          UIData.loginRoute: (BuildContext context) => (CleanCarLogin2Page()),
          //  UIData.SystemUpdateRoute:(BuildContext context) => (AppUpdatePage()),
        });
  }
}
